package com.interview.generator.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.interview.common.domain.model.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.util.Date;

/**
 * 代码生成业务表字段实体类
 *
 * @author zzw
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("gen_table_column")
@Schema(description = "代码生成业务表字段")
public class GenTableColumn extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "编号")
    @TableId
    private Long columnId;

    @Schema(description = "归属表编号")
    private Long tableId;

    @Schema(description = "列名称")
    private String columnName;

    @Schema(description = "列描述")
    private String columnComment;

    @Schema(description = "列类型")
    private String columnType;

    @Schema(description = "JAVA类型")
    private String javaType;

    @Schema(description = "JAVA字段名")
    private String javaField;

    @Schema(description = "是否主键（1是）")
    private String isPk;

    @Schema(description = "是否自增（1是）")
    private String isIncrement;

    @Schema(description = "是否必填（1是）")
    private String isRequired;

    @Schema(description = "是否为插入字段（1是）")
    private String isInsert;

    @Schema(description = "是否编辑字段（1是）")
    private String isEdit;

    @Schema(description = "是否列表显示（1是）")
    private String isList;

    @Schema(description = "是否查询字段（1是）")
    private String isQuery;

    @Schema(description = "查询方式（等于、不等于、大于、小于、范围等）")
    private String queryType;

    @Schema(description = "显示类型（input/textarea/select/date/radio/checkbox）")
    private String htmlType;

    @Schema(description = "字典类型")
    private String dictType;

    @Schema(description = "排序")
    private Integer sort;
}
